﻿<UserControl x:Class="GameListItem"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="100" d:DesignWidth="300">
    <Grid Name="grid" TextOptions.TextFormattingMode="Display" Cursor="Hand">
        <Grid.ContextMenu>
            <ContextMenu>
                <MenuItem Header="Clear all items" Name="mnuClear" Click="mnuClear_Click"></MenuItem>
                <MenuItem Header="Remove this item" Name="mnuRemove" Click="mnuRemove_Click"></MenuItem>
                <MenuItem Header="Delete downloaded file" Name="mnuDelete" Click="mnuDelete_Click"></MenuItem>
            </ContextMenu>
        </Grid.ContextMenu>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Border Name="imageBorder" Margin="6" Visibility="Collapsed">
            <Image Name="image" MaxHeight="40" MaxWidth="40" RenderOptions.BitmapScalingMode="HighQuality"></Image>
        </Border>
        <StackPanel Margin="3" Grid.Column="1">
            <TextBlock Name="textBlock" Padding="3">
                <Run Name="title" FontWeight="Bold">Game name</Run>
                <Run xml:space="preserve">   </Run>
                <Run Name="authorLabel">by ...</Run>
                <TextBlock.ToolTip>
                    <ToolTip Name="textTooltip"></ToolTip>
                </TextBlock.ToolTip>
            </TextBlock>
            <TextBlock Name="infoBlock" Padding="3">
                <Run Name="info">Info</Run>
                <TextBlock.ToolTip>
                    <ToolTip Name="infoTooltip"></ToolTip>
                </TextBlock.ToolTip>
            </TextBlock>
            <TextBlock Name="ratingBlock" Padding="3">
                <Run Foreground="Goldenrod" Name="stars">★★★★★</Run>
                <Run xml:space="preserve"> </Run>
                <Run Name="ratingValue" FontSize="10">(5 stars)</Run>
            </TextBlock>
            <TextBlock Name="notRatedBlock" Padding="3">
                Not yet rated
            </TextBlock>
            <StackPanel Orientation="Horizontal">
            </StackPanel>
        </StackPanel>
        <Button Name="cmdLaunch" Grid.Column="2" Padding="10,4,10,4" Margin="3" VerticalAlignment="Center" Cursor="Arrow">Play</Button>
        <ProgressBar Name="progressBar" Grid.Row="1" Grid.ColumnSpan="3" Height="12" Margin="3" Visibility="Collapsed" />
    </Grid>
</UserControl>
